<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>My All In</title>
        <style type="text/css">
            #loading-wrapper {
                text-align: center;
            }
            #loading {
                margin: 200px auto;
            }
            .action-btn {
            	margin: 0 5px 0 5px;
            }
        </style>
    </head>
    <body>
        <div id="loading-wrapper">
            <div id="loading">
                <p id="msg">正在加载...  1 / 3</p>
            </div>    
        </div>
        <link rel="stylesheet" type="text/css" href="${path}/js/lib/css/ext-theme-neptune/ext-theme-neptune-all.css" />
        <script type="text/javascript">
            var Fxt = {
                path: '${path}',
                PATH: '${path}',
                isDev: ${isDev?string},
                appFolder: '${path}/js/app',
                controllers: 'Fxt.index.Controller',
                menuData: {
                    children: [{
                        id: '10000',
                        text: 'Home',
                        leaf: false,
                        expanded: true,
                        children: [
                            {
                                id: '10010',
                                text: '身份证信息',
                                leaf: true,
                                value: 'id-card'
                            },
                            {
                                id: '10021',
                                text: 'Lbc-Account',
                                leaf: true,
                                value: 'lbc-account'
                            }
                            /*{
                                id: '10080',
                                text: '赚道钱包',
                                leaf: true,
                                value: 'zdn-sub-account'
                            },
                            {
                                id: '10090',
                                text: '赚道钱包-Bug',
                                leaf: true,
                                value: 'zdn-mock-account'
                            }
                            {
                                id: '10060',
                                text: 'Tana-Account',
                                leaf: true,
                                value: 'tana-account'
                            },
                            {
                                id: '10070',
                                text: 'Tana-Sub-Account',
                                leaf: true,
                                value: 'tana-sub-account'
                            },
                            {
                                id: '10020',
                                text: 'SilkTrader-Account',
                                leaf: true,
                                value: 'st-account'
                            },
                            {
                                id: '10030',
                                text: 'SilkTrader-Sub-Account',
                                leaf: true,
                                value: 'st-sub-account'
                            },
                            {
                                id: '10040',
                                text: 'CPCT-Account',
                                leaf: true,
                                value: 'cpct-account'
                            },
                            {
                                id: '10050',
                                text: 'CPCT-Sub-Account',
                                leaf: true,
                                value: 'cpct-sub-account'
                            }*/
                        ]
                    }, {
                        id: '20000',
                        text: 'System',
                        leaf: false,
                        expanded: true,
                        children: [
                            {
                                id: '20010',
                                text: '系统配置',
                                leaf: true,
                                value: 'sys-config'
                            },
                            {
                                id: '10100',
                                text: 'STL-JY',
                                leaf: true,
                                value: 'stl-jy'
                            },
                            {
                                id: '10200',
                                text: 'STL-SELL',
                                leaf: true,
                                value: 'stl-sell'
                            },
                            {
                                id: '10300',
                                text: 'GT-JY',
                                leaf: true,
                                value: 'gt-jy'
                            },
                            {
                                id: '20020',
                                text: 'Job-Task',
                                leaf: true,
                                value: 'job-task'
                            }
                        ]
                    }]
                },
                menuWidth: 160,
                getCmpWidth: function(cmp, name) {
                    var className = Ext.getClassName(cmp);
                    var cmpId = className + '.' + name;
                    var width = Fxt.cmpSizes[cmpId];
                    return width == null ? 80 : width;
                },
                gridColumnResize: function(ct, column, width) {
                    var className = Ext.getClassName(this);
                    var cmpId = className + '.' + column.dataIndex;
                    Fxt.cmpSizes[cmpId] = width;
                    Fxt.ajax({
                        waitMsg: false,
                        url: Fxt.path + "/config/save-cmp-size",
                        params: {
                            'cmpId': cmpId,
                            'width': width
                        }
                    });
                },
                cmpSizes: ${cmpSizes}
            };
            function get_grid_width () {
                console.log(arguments);
            }
            var isDev = Fxt.isDev;
        </script>
        <script type="text/javascript">document.getElementById('msg').innerHTML = '正在加载...  2 / 3';</script>
        <script type="text/javascript" src="${path}/js/lib/js/extjs/ext-all.js"></script>
        <script type="text/javascript">
            Ext.Loader.setConfig({
                enabled: true,
                disableCaching: true,
                paths: {
                    'Fxt': '${path}/js/app',
                    'Ext.ux': '${path}/js/lib/js/ext-core/ux',
                    'Fxt.core' : '${path}/js/lib/js/ext-core'
                }
            });
            Ext.state.Manager.setProvider(Ext.create('Ext.state.LocalStorageProvider'));
        </script>
        <link rel="stylesheet" type="text/css" href="${path}/iziToast/css/iziToast.min.css" />
        <script type="text/javascript" src="${path}/iziToast/js/iziToast.min.js?v=${stm}"></script>
        <script type="text/javascript" src="${path}/js/lib/js/ext-core/ext-core.js?v=${stm}"></script>
        <script type="text/javascript" src="${path}/js/app/settings.js?v=${stm}"></script>
        <script type="text/javascript">document.getElementById('msg').innerHTML = '正在加载...  3 / 3, 构建首页中...';</script>
        <script type="text/javascript">
            Ext.require('Fxt.index.Controller', function() {
                Fxt.app = Ext.application({
                    name: "Fxt",
                    appFolder: Fxt.appFolder,
                    controllers: Fxt.controllers,
                    launch: function() {
                        Fxt.$viewport = Ext.create('Fxt.index.view.Viewport');
                        Ext.fly('loading-wrapper').remove();
                    }
                });
            });
        </script>
    </body>
</html>